using M13.Game;
using M13.Game.Item;
using M13.Game.World;
using M13.GameSystem.Inventory;
using QFramework;
using UnityEngine;

namespace M13
{
    public interface IGameModal : IModel
    {
        public BindableProperty<SaveConfig> GameSaveConfig { get; set; }
    }


    public class GameModals : AbstractModel, IGameModal
    {
        public BindableProperty<SaveConfig> GameSaveConfig { get; set; } = new BindableProperty<SaveConfig>();

        protected override void OnInit()
        {

        }
    }

    public interface IPlayerModal : IModel
    {
        BindableProperty<Vector3> PlayerPos { get; set; }
        BindableProperty<string> PlayerCurrentState { get; set; }
        BindableProperty<Vector2Int> ChunkCoordPlayerIn { get; set; }
        BindableProperty<Inventory> PlayerInventory { get; set; }
        BindableProperty<Item> PlayerHoldingItem { get; set; }
        BindableProperty<int> SelectedShortcutSoltIndex { get; set; }
        BindableProperty<Transform> PlayerHitInfo { get; set; }
    }
    public class PlayerModal : AbstractModel, IPlayerModal
    {
        public BindableProperty<Vector3> PlayerPos { get; set; } = new BindableProperty<Vector3>();
        public BindableProperty<string> PlayerCurrentState { get; set; } = new BindableProperty<string>(null);
        public BindableProperty<Vector2Int> ChunkCoordPlayerIn { get; set; } = new BindableProperty<Vector2Int>();
        public BindableProperty<Inventory> PlayerInventory { get; set; } = new BindableProperty<Inventory>(null);
        public BindableProperty<Item> PlayerHoldingItem { get; set; } = new BindableProperty<Item>();
        public BindableProperty<int> SelectedShortcutSoltIndex { get; set; } = new BindableProperty<int>(0);
        public BindableProperty<Transform> PlayerHitInfo { get; set; } = new BindableProperty<Transform>();

        protected override void OnInit()
        {

        }
    }


    public interface ICameraModal : IModel
    {
        BindableProperty<Vector3> CameraPos { get; set; }
        BindableProperty<Quaternion> CameraRot { get; set; }
        BindableProperty<Vector3> MouseTarget { get; set; }
        BindableProperty<string> ItemName { get; set; }
        BindableProperty<Vector3> RayHitedChunkPos { get; set; }
    }
    public class CameraModal : AbstractModel, ICameraModal
    {
        public BindableProperty<Vector3> CameraPos { get; set; } = new BindableProperty<Vector3>();
        public BindableProperty<Vector3> MouseTarget { get; set; } = new BindableProperty<Vector3>();
        public BindableProperty<string> ItemName { get; set; } = new BindableProperty<string>();
        public BindableProperty<Vector3> RayHitedChunkPos { get; set; } = new BindableProperty<Vector3>();
        public BindableProperty<Quaternion> CameraRot { get; set; } = new BindableProperty<Quaternion>();

        protected override void OnInit()
        {

        }
    }
}